home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / hacky_sack_jr.swf / scripts / DefineSprite_310 / frame_28 / DoAction.as
Text File  |  2011-08-19  |  387b  |  18 lines

  1. n += "1";
  2. radius1 = _width / "2";
  3. radius2 = getProperty("/ball", _width) / "2";
  4. obj1_x = _X;
  5. obj2_x = getProperty("/ball", _X);
  6. delta_x = obj1_x - obj2_x;
  7. obj1_y = _Y;
  8. obj2_y = getProperty("/ball", _Y);
  9. delta_y = obj1_y - obj2_y;
  10. if((radius1 + radius2) * (radius1 + radius2) >= delta_x * delta_x + delta_y * delta_y)
  11. {
  12.    gotoAndPlay(30);
  13. }
  14. else
  15. {
  16.    gotoAndPlay(28);
  17. }
  18.